﻿@inject IDataService _service
@{
    var site_config = _service.get_site_config();
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - @site_config.site_name</title>
    @if (site_config.site_color == "gray")
    {
        <script src="/js/grayscale.js"></script>
        <script>
            window.onload=function(){
                grayscale(document.body);
            }
        </script>
        <style type="text/css">
            html {overflow-y:scroll;filter:progid:DXImageTransform.Microsoft.BasicImage(grayscale=1);-webkit-filter: grayscale(100%);}    
        </style>
    }
    <link rel="stylesheet" href="/templates/sscms/css/bootstrap-4.1.0.min.css">
    <link rel="stylesheet" href="/templates/sscms/css/font-awesome-4.7.0.min.css">
    <link rel="stylesheet" href="/templates/sscms/css/siteserver.min.css">
    <link rel="stylesheet" href="/templates/sscms/css/style.css">
    <link rel="stylesheet" href="/templates/sscms/css/element-ui.css">
    <link href="/templates/sscms/css/index.css" rel="stylesheet" type="text/css" />
    <style>
        .nav-link {
            display: inline;
            padding: 0;
        }

        .ss-dropdown {
            width: 260px;
        }

        .dropdown-item {
            cursor: pointer;
        }

        .swiper-container {
            width: 672px;
            max-width: 100%;
            height: 380px;
        }

        @@media (max-width:993px) {
            .cmsv7_nav span {
                margin: 0 8px;
            }

            .cmsv7ul {
                margin-left: -15px;
                margin-right: -15px;
            }

                .cmsv7ul li {
                    width: 50%;
                    padding: 0 15px !important;
                }
        }
    </style>
    @RenderSection("header", required: false)
</head>

<body>
    <div id="mainContent">
        <nav class="navbar navbar-expand-md fixed-top">
            <div class="container">
                <a class="navbar-brand" href="/">
                    <span class="logo"></span>
                </a>
                <button class="navbar-toggler collapsed menu-toggle-button">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div class="collapse navbar-collapse" id="collapsibleNavbar">
                    <ul class="navbar-nav">
                        <li class="nav-item">
                            <a class="nav-link" href="/">首 页</a>
                        </li>
                        @foreach (var item in _service.get_column_nav())
                        {
                            string url = $"/column/article_list/{item.id}";
                            if (!string.IsNullOrEmpty(item.route_value))
                            {
                                url = $"/{item.route_value}";
                            }
                            if (item.column_attribute == column_attribute_enum.外部链接 && !string.IsNullOrEmpty(item.external_link))
                            {
                                url = item.external_link;
                            }
                            <li class="nav-item">
                                <a class="nav-link" href="@url" target="@item.target">@item.column_name</a>
                            </li>
                        }
                    </ul>
                </div>

                <style>
                    .nav-link {
                        display: inline;
                        padding: 0;
                    }

                    .ss-dropdown {
                        width: 260px;
                    }

                    .dropdown-item {
                        cursor: pointer;
                    }
                </style>
                <div id="status">
                    <template v-if="user && pageLoad">
                        <div class="menu-extras">
                            <ul class="list-inline float-right mb-0">
                                <li class="list-inline-item dropdown notification-list">
                                    <a click="openUserMenu" class="nav-link dropdown-toggle nav-user" href="javascript:;" style="position: relative;display: block;width: 80px;">
                                        <img :src="getAvatarUrl()" alt="user" class="rounded-circle">
                                        <span v-if="user.isVip" class="badge badge-purple noti-icon-badge" style="top: -12px;right: 12px;">vip</span>
                                    </a>
                                    <div click="menuClick" :style="{display: isUserMenu ? 'block': 'none'}" class="dropdown-menu dropdown-menu-right ss-dropdown">

                                        <ul class="list-group list-group-flush">
                                            <li class="list-group-item text-muted font-15" style="font-size: 14px;">
                                                欢迎回来，{{ user.displayName || user.userName }}
                                            </li>
                                        </ul>

                                        <a href="/home/" style="font-size: 14px;" target="_blank" class="dropdown-item notify-item">
                                            <i class="fa fa-home"></i>
                                            用户中心
                                        </a>

                                        <!-- <a href="/home#profile/" style="font-size: 14px;" class="dropdown-item notify-item">
                                          <i class="fa fa-gear"></i>
                                          设 置
                                        </a> -->

                                        <a :href="getLogoutUrl()" style="font-size: 14px;" class="dropdown-item notify-item">
                                            <i class="fa fa-sign-out"></i>
                                            退 出
                                        </a>
                                    </div>
                                </li>

                            </ul>
                        </div>
                    </template>
                    <template v-else-if="pageLoad">
                        <span>
                            <a class="nav-link" style="font-size: 14px;" :href="getRegisterUrl()">
                                注 册
                            </a>
                            <a class="nav-link" style="font-size: 14px;" :href="getLoginUrl()">
                                登 录
                            </a>
                        </span>
                    </template>
                </div>
            </div>
        </nav>

        @RenderBody()

        <div class="sBom2">
            <div class="container clearfix">
                <img class="sBom2_logo" src="/templates/sscms/images/bom_logo.png" width="195" height="34">
                <div class="sBom1L" style="position: absolute;left: 15px;top: 45px;">
                    <strong class="aBom_t">源码下载</strong>
                    <a href="https://github.com/siteserver/cms" target="_blank">
                        <img src="/templates/sscms/images/github.png" style="width: 50px; height: 50px; margin-right: 15px;" />
                    </a>
                    <a href="https://gitee.com/siteserver/cms" target="_blank">
                        <img src="/templates/sscms/images/gitee.png" style="width: 50px; height: 50px; margin-right: 15px;" />
                    </a>
                </div>
                <dl class="sBom2_dl">
                    <dt>v6cms 入门</dt>
                    <dd>
                        <a href="/docs/v7/getting-started/using-linux-centos.html" target="_blank" class="sBom2_a">在 Linux 中运行</a>
                    </dd>
                    <dd>
                        <a href="/docs/v7/getting-started/using-windows.html" target="_blank" class="sBom2_a">在 Windows 中运行</a>
                    </dd>
                    <dd>
                        <a href="/docs/v7/getting-started/using-mac.html" target="_blank" target="_blank" class="sBom2_a">在 MacOS 中运行</a>
                    </dd>
                    <dd>
                        <a href="/docs/v7/getting-started/using-docker.html" target="_blank" target="_blank" class="sBom2_a">在 Docker 中运行</a>
                    </dd>
                    <dd>
                        <a href="/docs/v7/getting-started/features.html" target="_blank" target="_blank" class="sBom2_a">v6cms 功能清单</a>
                    </dd>
                </dl>
                <dl class="sBom2_dl">
                    <dt>参考手册</dt>
                    <dd>
                        <a href="/docs/v7/stl/" target="_blank" target="_blank" class="sBom2_a">STL语言</a>
                    </dd>
                    <dd>
                        <a href="/docs/v7/official/" target="_blank" target="_blank" class="sBom2_a">插件手册</a>
                    </dd>
                    <dd>
                        <a href="/docs/v7/cli/" target="_blank" target="_blank" class="sBom2_a">CLI命令行</a>
                    </dd>
                    <dd>
                        <a href="/docs/v7/api/" target="_blank" target="_blank" class="sBom2_a">REST API </a>
                    </dd>
                    <dd>
                        <a href="/docs/v7/model/" target="_blank" target="_blank" class="sBom2_a">数据结构</a>
                    </dd>
                </dl>
                <dl class="sBom2_dl">
                    <dt>开源生态</dt>
                    <dd>
                        <a href="/partners/" class="sBom2_a">合作伙伴</a>
                    </dd>
                    <dd>
                        <a href="https://github.com/siteserver/cms/issues/" target="_blank" class="sBom2_a">Github Issues</a>
                    </dd>
                    <dd>
                        <a href="https://gitee.com/siteserver/cms/issues/" target="_blank" class="sBom2_a">Gitee Issues</a>
                    </dd>
                </dl>
                <div class="sBom2_dl text-center">
                    <img src="/templates/sscms/images/qrcode_for_wx.jpg" width="120" height="120">
                    <br>
                    <small class="text-white">微信服务号</small>
                </div>
            </div>
        </div>
        <footer class="footer" style="height: 65px;">
            <div class="container">
                <div class="row">
                    <div class="col-12 text-center">
                        @Html.Raw(site_config.copyright)
                        <a target="_blank" href="http://www.beian.miit.gov.cn/">@site_config.icp</a>
                        <br />
                        技术支持：<a href="https://www.jundie.net" target="_blank">南京骏蝶科技有限公司</a>
                        <br />
                        @Html.Raw(site_config.count_code)
                    </div>
                </div>
            </div>
        </footer>
        <a href="#" class="backToTop"></a>

    </div>
    <div id="menuContent">
        <div class="row">
            <div class="col-12">
                <div class="card-body">
                    <a class="text-dark font-18" href="/">首 页</a>
                    <hr />

                    <a class="text-dark font-18" href="/cms/">产 品</a>
                    <hr>

                    <a class="text-dark font-18" href="/plugins/">插 件</a>
                    <hr>

                    <a class="text-dark font-18" href="/templates/">模 板</a>
                    <hr>

                    <a class="text-dark font-18" href="/docs/">文 档</a>
                    <hr>

                    <a class="text-dark font-18" href="/partners/">生 态</a>
                    <hr>

                    <a class="text-dark font-18" href="/aboutus/">关 于</a>
                    <hr>

                    <a class="text-dark font-18" target="_blank" href="https://sscms.com/docs/v7/updates/">版本更新</a>
                    <hr>

                </div>
            </div>
        </div>
    </div>
    <script src="~/lib/jquery/dist/jquery.min.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/slideout-1.0.1.min.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/es6-promise.auto.min.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/axios-0.17.1.min.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/layer.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/vue-2.5.16.min.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/vee-validate-2.1.0.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/vee-validate-locale-zh_CN-2.1.0.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/js.cookie-2.2.0.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/lodash-4.17.10.min.js"></script>
    <script type="text/javascript" src="/templates/sscms/js/index.js"></script>
    <script src="/templates/sscms/js/ci.js"></script>
    <script src="/templates/sscms/js/home.js" type="text/javascript"></script>
    <script type="text/javascript" src="/templates/sscms/js/utils.js" data-type="user"></script>
    <script type="text/javascript" src="/templates/sscms/js/cloud.js" data-type="user"></script>
    <script type="text/javascript" src="/templates/sscms/js/status.js"></script>
    @RenderSection("Scripts", required: false)
</body>
</html>
